package com.k2data.test.testng.listener.hook;

import org.testng.annotations.AfterMethod;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;

/**
 * IHookable Listener demo
 * @author wangchuan 2019-03-18
 *
 */
@Listeners(IHookableListener.class)
public class IHookableListenerExample {
	
	@BeforeSuite(description="@BeforeSuite")
	public void beforeSuite() {
		System.out.println("in beforeSuite");
	}
	
	@BeforeTest(description="@BeforeTest")
	public void beforeTest() {
		System.out.println("in beforeTest");
	}
	
	@BeforeMethod(description="@BeforeMethod")
	public void beforeMethod() {
		System.out.println("in beforeMethod");
	}
		
	@Test(description="@Test")
	public void t() {
		System.out.println("in test method");
	}	

	@AfterMethod(description="@AfterMethod")
	public void afterMethod() {
		System.out.println("in afterMethod");
	}
	
	@AfterTest(description="@AfterTest")
	public void afterTest() {
		System.out.println("in afterTest");
	}
	
	@AfterSuite(description="@AfterSuite")
	public void afterSuite() {
		System.out.println("in after suite");
	}
}
